﻿@model RedSand.Site.Models.CreateUserModel
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
<div class="dialog" title="Create" style="width: 714px;">
    @using (Ajax.BeginForm(AdminAjaxOptions.CreateNew))
    {
        <div class="dialog-content">
            <div class="form-cell">
                @Html.LabelFor(model => model.Username)
                @Html.TextBoxFor(model => model.Username)
            </div>
            <div class="form-cell">
                @Html.LabelFor(model => model.Fullname)
                @Html.TextBoxFor(model => model.Fullname)
            </div>
            <div class="form-cell">
                @Html.LabelFor(model => model.Password)
                @Html.PasswordFor(model => model.Password)
            </div>
            <div class="form-cell">
                @Html.LabelFor(model => model.ConfirmPassword)
                @Html.PasswordFor(model => model.ConfirmPassword)
            </div>
            <div class="form-cell">
                @Html.LabelFor(model => model.Email)
                @Html.TextBoxFor(model => model.Email)
            </div>
            <div class="form-cell">
                @Html.LabelFor(model => model.Phone)
                @Html.TextBoxFor(model => model.Phone)
            </div>
            <div class="form-cell">
                @Html.LabelFor(model => model.Birthday)
                @Html.TextBoxFor(model => model.Birthday, new { @class = "date-picker" })
            </div>
            <div class="clear"></div>
            <div class="form-cell">
                <label>Allow role</label>
                <div class="mimic-input">
                    @Html.Action("GetRoleForUser", "Role", new { UserID = 0, enable = true })
                </div>
            </div>
            <div class="form-cell">
                @Html.LabelFor(model => model.Status)
                @Html.DropDownListFor(model => model.Status, DropDownListHelper.GetStatusList(false))
            </div>
            <div class="clear"></div>
        </div>
        <div class="dialog-footer">
            <input type="submit" value="Save"/>
            <input type="button" value="Cancel" onclick="closeDialog('.dialog')" />
        </div>
    }
</div>
